package com.example.springboot_study.dao;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Repository;

import javax.annotation.PostConstruct;

/**
 * @ClassName UserDAO
 * @Description TODO
 * @Author H.
 * @Date 2023/4/23 20:07
 * @Version 1.0
 */

@Repository
@Slf4j
public class UserDAO {
    @Value("${spring.datasource.url}")
    private String url;
    @Value("${spring.datasource.username}")
    private String username;
    @Value("${spring.datasource.password}")
    private String password;
//    @Value("${hello}")
//    private String hello;


    @PostConstruct
    public void init() {
        //模拟连接
        System.out.println(url);
        System.out.println(username);
        System.out.println(password);
//        System.out.println(hello);
        log.debug("================================debug");
        log.info("================================info");
        log.warn("================================warn");
        log.error("================================error");
    }
}
